{ ********************************************************************* }
{ Module Name: EVENT.PAS                                                }
{ Purpose: Event type definition headfile                               }
{ Version: 3.01                                                         }
{ Date: 01/08/2003                                                      }
{ Copyright (c) 1996-2003 Advantech Corp. Ltd.                          }
{ All rights reserved.                                                  }
{ ********************************************************************* }

{ Notes:								}
{ 1. Bit-mapped ID:							}
{    From 0x0001 to 0x0200 : defined at Driver.h, BIT-mapped Event ID.	}
{    From 0x0201 to 0x0205 : defined at Driver.h  ID-mapped Event ID.	}
{    From 0x0206 to 0x0fff : not used					}
{    From 0x1000 to 0xffff : defined at Event.h   ID-mapped Event ID.	}

{ 2. Version 2.0A and before don't use Event.h.				}

{ 3. EventID = 0x0000 is reserved for non event or error.		}
{    EventID = 0xffff is reserved for time out.				}

{ 4. The sub event naming standard from 0x1000 to 0x6fff: 		}
{      0x1000 ~ 0x1fff    for AI Event Group				}
{         0x1000 ~ 0x17ff for General AI Event ID			}
{         0x1800 ~ 0x18ff for AI others Event ID			}
{      0x2000 ~ 0x2fff    for AO Event Group				}
{         0x2000 ~ 0x27ff for General AO Event ID			}
{         0x2800 ~ 0x28ff for AO others Event ID			}
{      0x3000 ~ 0x3fff    for DI Event Group				}
{         0x3000 ~ 0x30ff for General DI Event ID			}
{         0x3400 ~ 0x34ff for General IDI Event ID			}
{         0x3800 ~ 0x3fff for others Event ID				}
{      0x4000 ~ 0x4fff for DO Event Group				}
{         0x4000 ~ 0x47ff for DO Gernal Event ID			}
{         0x4800 ~ 0x48ff for DO others Event ID			}
{      0x5000 ~ 0x5fff for Counter/Timer Event Group			}
{         0x5000 ~ 0x50ff for Counter TC Event ID			}
{         0x5100 ~ 0x51ff for counter OverFlow Event ID			}
{         0x5200 ~ 0x52ff for counter UnderFlow Event ID		}
{         0x5300 ~ 0x53ff for counter OverCompare Event ID		}
{         0x5400 ~ 0x54ff for counter UnderCompare Event ID		}
{         0x5500 ~ 0x55ff for General Timer Event ID			}
{         0x5800 ~ 0x58ff for Counter/Timer others Event ID		}
{      0x6000 ~ 0x6fff not used at Version 2.0B				}

unit EVENT;
interface
uses windows;
const
{ ==================================					 }
{ 0x0000 and 0xffff}
{ ----------------------------------					 }
  ADS_EVT_NO_EVENT = $0000;
  ADS_EVT_TIME_OUT = $ffff;

{   ==================================                                    }
{ 0x1000 ~ 0x1fff for AI Group                                            }
{   ----------------------------------                                    }
  ADS_EVT_AI_BUFFER1_FULL =     $1800;
  ADS_EVT_AI_BUFFER2_FULL =     $1801;

      ADS_EVT_AI_BUFFER1_FULL_NAME = 'ADS_EVT_AI_BUFFER1_FULL';
      ADS_EVT_AI_BUFFER2_FULL_NAME = 'ADS_EVT_AI_BUFFER2_FULL';
{ ----------------------------------                                      }
{ 0x2000 ~ 0x2fff for AO Group                                            }
{ ----------------------------------                                      }
  { sub group 0x2000 ~ 0x27ff for AO General ID                           }
  
  { sub group 0x2800 ~ 0x2fff for AO other ID                             }
  ADS_EVT_AO_BUFFER1_EMPTY = $2800;
  ADS_EVT_AO_BUFFER2_EMPTY = $2801;
  ADS_EVT_AO_INTERRUPT     = $2802;
  ADS_EVT_AO_BUFCHANGE     = $2803;
  ADS_EVT_AO_TERMINATED    = $2804;
  ADS_EVT_AO_UNDERRUN      = $2805;
  ADS_EVT_AO_HIBUF_TRANSFERED  = $2806;
  ADS_EVT_AO_LOBUF_TRANSFERED  = $2807;
  

       ADS_EVT_AO_BUFFER1_EMPTY_NAME = 'ADS_EVT_AO_BUFFER1_EMPTY';
       ADS_EVT_AO_BUFFER2_EMPTY_NAME = 'ADS_EVT_AO_BUFFER2_EMPTY';

  

{ ----------------------------------                                      }
{ 0x3000 ~ 0x3fff for DI Group                                            }
{ ----------------------------------                                      }
  { sub group 0x3000 ~ 0x37ff for DI General ID                           }
  ADS_EVT_INTERRUPT_DI0 = $3000;
  ADS_EVT_INTERRUPT_DI1 = ADS_EVT_INTERRUPT_DI0 + 1;
  ADS_EVT_INTERRUPT_DI2 = ADS_EVT_INTERRUPT_DI0 + 2;
  ADS_EVT_INTERRUPT_DI3 = ADS_EVT_INTERRUPT_DI0 + 3;
  ADS_EVT_INTERRUPT_DI4 = ADS_EVT_INTERRUPT_DI0 + 4;
  ADS_EVT_INTERRUPT_DI5 = ADS_EVT_INTERRUPT_DI0 + 5;
  ADS_EVT_INTERRUPT_DI6 = ADS_EVT_INTERRUPT_DI0 + 6;
  ADS_EVT_INTERRUPT_DI7 = ADS_EVT_INTERRUPT_DI0 + 7;
  
  { -------------------2.2-----------------------------}
  ADS_EVT_INTERRUPT_DI8 = ADS_EVT_INTERRUPT_DI0 + 8;
  ADS_EVT_INTERRUPT_DI9 = ADS_EVT_INTERRUPT_DI0 + 9;
  ADS_EVT_INTERRUPT_DI10 = ADS_EVT_INTERRUPT_DI0 + 10;
  ADS_EVT_INTERRUPT_DI11 = ADS_EVT_INTERRUPT_DI0 + 11;
  ADS_EVT_INTERRUPT_DI12 = ADS_EVT_INTERRUPT_DI0 + 12;
  ADS_EVT_INTERRUPT_DI13 = ADS_EVT_INTERRUPT_DI0 + 13;
  ADS_EVT_INTERRUPT_DI14 = ADS_EVT_INTERRUPT_DI0 + 14;
  ADS_EVT_INTERRUPT_DI15 = ADS_EVT_INTERRUPT_DI0 + 15;

  ADS_EVT_INTERRUPT_DI16 = ADS_EVT_INTERRUPT_DI0 + 16;
  ADS_EVT_INTERRUPT_DI17 = ADS_EVT_INTERRUPT_DI0 + 17;
  ADS_EVT_INTERRUPT_DI18 = ADS_EVT_INTERRUPT_DI0 + 18;
  ADS_EVT_INTERRUPT_DI19 = ADS_EVT_INTERRUPT_DI0 + 19;
  ADS_EVT_INTERRUPT_DI20 = ADS_EVT_INTERRUPT_DI0 + 20;
  ADS_EVT_INTERRUPT_DI21 = ADS_EVT_INTERRUPT_DI0 + 21;
  ADS_EVT_INTERRUPT_DI22 = ADS_EVT_INTERRUPT_DI0 + 22;
  ADS_EVT_INTERRUPT_DI23 = ADS_EVT_INTERRUPT_DI0 + 23;

  ADS_EVT_INTERRUPT_DI24 = ADS_EVT_INTERRUPT_DI0 + 24;
  ADS_EVT_INTERRUPT_DI25 = ADS_EVT_INTERRUPT_DI0 + 25;
  ADS_EVT_INTERRUPT_DI26 = ADS_EVT_INTERRUPT_DI0 + 26;
  ADS_EVT_INTERRUPT_DI27 = ADS_EVT_INTERRUPT_DI0 + 27;
  ADS_EVT_INTERRUPT_DI28 = ADS_EVT_INTERRUPT_DI0 + 28;
  ADS_EVT_INTERRUPT_DI29 = ADS_EVT_INTERRUPT_DI0 + 29;
  ADS_EVT_INTERRUPT_DI30 = ADS_EVT_INTERRUPT_DI0 + 30;
  ADS_EVT_INTERRUPT_DI31 = ADS_EVT_INTERRUPT_DI0 + 31;

  ADS_EVT_INTERRUPT_DI32 = ADS_EVT_INTERRUPT_DI0 + 32;
  ADS_EVT_INTERRUPT_DI33 = ADS_EVT_INTERRUPT_DI0 + 33;
  ADS_EVT_INTERRUPT_DI34 = ADS_EVT_INTERRUPT_DI0 + 34;
  ADS_EVT_INTERRUPT_DI35 = ADS_EVT_INTERRUPT_DI0 + 35;
  ADS_EVT_INTERRUPT_DI36 = ADS_EVT_INTERRUPT_DI0 + 36;
  ADS_EVT_INTERRUPT_DI37 = ADS_EVT_INTERRUPT_DI0 + 37;
  ADS_EVT_INTERRUPT_DI38 = ADS_EVT_INTERRUPT_DI0 + 38;
  ADS_EVT_INTERRUPT_DI39 = ADS_EVT_INTERRUPT_DI0 + 39;

  ADS_EVT_INTERRUPT_DI40 = ADS_EVT_INTERRUPT_DI0 + 40;
  ADS_EVT_INTERRUPT_DI41 = ADS_EVT_INTERRUPT_DI0 + 41;
  ADS_EVT_INTERRUPT_DI42 = ADS_EVT_INTERRUPT_DI0 + 42;
  ADS_EVT_INTERRUPT_DI43 = ADS_EVT_INTERRUPT_DI0 + 43;
  ADS_EVT_INTERRUPT_DI44 = ADS_EVT_INTERRUPT_DI0 + 44;
  ADS_EVT_INTERRUPT_DI45 = ADS_EVT_INTERRUPT_DI0 + 45;
  ADS_EVT_INTERRUPT_DI46 = ADS_EVT_INTERRUPT_DI0 + 46;
  ADS_EVT_INTERRUPT_DI47 = ADS_EVT_INTERRUPT_DI0 + 47;

  ADS_EVT_INTERRUPT_DI48 = ADS_EVT_INTERRUPT_DI0 + 48;
  ADS_EVT_INTERRUPT_DI49 = ADS_EVT_INTERRUPT_DI0 + 49;
  ADS_EVT_INTERRUPT_DI50 = ADS_EVT_INTERRUPT_DI0 + 50;
  ADS_EVT_INTERRUPT_DI51 = ADS_EVT_INTERRUPT_DI0 + 51;
  ADS_EVT_INTERRUPT_DI52 = ADS_EVT_INTERRUPT_DI0 + 52;
  ADS_EVT_INTERRUPT_DI53 = ADS_EVT_INTERRUPT_DI0 + 53;
  ADS_EVT_INTERRUPT_DI54 = ADS_EVT_INTERRUPT_DI0 + 54;
  ADS_EVT_INTERRUPT_DI55 = ADS_EVT_INTERRUPT_DI0 + 55;

  ADS_EVT_INTERRUPT_DI56 = ADS_EVT_INTERRUPT_DI0 + 56;
  ADS_EVT_INTERRUPT_DI57 = ADS_EVT_INTERRUPT_DI0 + 57;
  ADS_EVT_INTERRUPT_DI58 = ADS_EVT_INTERRUPT_DI0 + 58;
  ADS_EVT_INTERRUPT_DI59 = ADS_EVT_INTERRUPT_DI0 + 59;
  ADS_EVT_INTERRUPT_DI60 = ADS_EVT_INTERRUPT_DI0 + 60;
  ADS_EVT_INTERRUPT_DI61 = ADS_EVT_INTERRUPT_DI0 + 61;
  ADS_EVT_INTERRUPT_DI62 = ADS_EVT_INTERRUPT_DI0 + 62;
  ADS_EVT_INTERRUPT_DI63 = ADS_EVT_INTERRUPT_DI0 + 63;

  ADS_EVT_INTERRUPT_DI64 = ADS_EVT_INTERRUPT_DI0 + 64;
  ADS_EVT_INTERRUPT_DI65 = ADS_EVT_INTERRUPT_DI0 + 65;
  ADS_EVT_INTERRUPT_DI66 = ADS_EVT_INTERRUPT_DI0 + 66;
  ADS_EVT_INTERRUPT_DI67 = ADS_EVT_INTERRUPT_DI0 + 67;
  ADS_EVT_INTERRUPT_DI68 = ADS_EVT_INTERRUPT_DI0 + 68;
  ADS_EVT_INTERRUPT_DI69 = ADS_EVT_INTERRUPT_DI0 + 69;
  ADS_EVT_INTERRUPT_DI70 = ADS_EVT_INTERRUPT_DI0 + 70;
  ADS_EVT_INTERRUPT_DI71 = ADS_EVT_INTERRUPT_DI0 + 71;

  ADS_EVT_INTERRUPT_DI72 = ADS_EVT_INTERRUPT_DI0 + 72;
  ADS_EVT_INTERRUPT_DI73 = ADS_EVT_INTERRUPT_DI0 + 73;
  ADS_EVT_INTERRUPT_DI74 = ADS_EVT_INTERRUPT_DI0 + 74;
  ADS_EVT_INTERRUPT_DI75 = ADS_EVT_INTERRUPT_DI0 + 75;
  ADS_EVT_INTERRUPT_DI76 = ADS_EVT_INTERRUPT_DI0 + 76;
  ADS_EVT_INTERRUPT_DI77 = ADS_EVT_INTERRUPT_DI0 + 77;
  ADS_EVT_INTERRUPT_DI78 = ADS_EVT_INTERRUPT_DI0 + 78;
  ADS_EVT_INTERRUPT_DI79 = ADS_EVT_INTERRUPT_DI0 + 79;

  ADS_EVT_INTERRUPT_DI80 = ADS_EVT_INTERRUPT_DI0 + 80;
  ADS_EVT_INTERRUPT_DI81 = ADS_EVT_INTERRUPT_DI0 + 81;
  ADS_EVT_INTERRUPT_DI82 = ADS_EVT_INTERRUPT_DI0 + 82;
  ADS_EVT_INTERRUPT_DI83 = ADS_EVT_INTERRUPT_DI0 + 83;
  ADS_EVT_INTERRUPT_DI84 = ADS_EVT_INTERRUPT_DI0 + 84;
  ADS_EVT_INTERRUPT_DI85 = ADS_EVT_INTERRUPT_DI0 + 85;
  ADS_EVT_INTERRUPT_DI86 = ADS_EVT_INTERRUPT_DI0 + 86;
  ADS_EVT_INTERRUPT_DI87 = ADS_EVT_INTERRUPT_DI0 + 87;

  ADS_EVT_INTERRUPT_DI88 = ADS_EVT_INTERRUPT_DI0 + 88;
  ADS_EVT_INTERRUPT_DI89 = ADS_EVT_INTERRUPT_DI0 + 89;
  ADS_EVT_INTERRUPT_DI90 = ADS_EVT_INTERRUPT_DI0 + 90;
  ADS_EVT_INTERRUPT_DI91 = ADS_EVT_INTERRUPT_DI0 + 91;
  ADS_EVT_INTERRUPT_DI92 = ADS_EVT_INTERRUPT_DI0 + 92;
  ADS_EVT_INTERRUPT_DI93 = ADS_EVT_INTERRUPT_DI0 + 93;
  ADS_EVT_INTERRUPT_DI94 = ADS_EVT_INTERRUPT_DI0 + 94;
  ADS_EVT_INTERRUPT_DI95 = ADS_EVT_INTERRUPT_DI0 + 95;

  ADS_EVT_INTERRUPT_DI96 = ADS_EVT_INTERRUPT_DI0 + 96;
  ADS_EVT_INTERRUPT_DI97 = ADS_EVT_INTERRUPT_DI0 + 97;
  ADS_EVT_INTERRUPT_DI98 = ADS_EVT_INTERRUPT_DI0 + 98;
  ADS_EVT_INTERRUPT_DI99 = ADS_EVT_INTERRUPT_DI0 + 99;
  ADS_EVT_INTERRUPT_DI100 = ADS_EVT_INTERRUPT_DI0 + 100;
  ADS_EVT_INTERRUPT_DI101 = ADS_EVT_INTERRUPT_DI0 + 101;
  ADS_EVT_INTERRUPT_DI102 = ADS_EVT_INTERRUPT_DI0 + 102;
  ADS_EVT_INTERRUPT_DI103 = ADS_EVT_INTERRUPT_DI0 + 103;

  ADS_EVT_INTERRUPT_DI104 = ADS_EVT_INTERRUPT_DI0 + 104;
  ADS_EVT_INTERRUPT_DI105 = ADS_EVT_INTERRUPT_DI0 + 105;
  ADS_EVT_INTERRUPT_DI106 = ADS_EVT_INTERRUPT_DI0 + 106;
  ADS_EVT_INTERRUPT_DI107 = ADS_EVT_INTERRUPT_DI0 + 107;
  ADS_EVT_INTERRUPT_DI108 = ADS_EVT_INTERRUPT_DI0 + 108;
  ADS_EVT_INTERRUPT_DI109 = ADS_EVT_INTERRUPT_DI0 + 109;
  ADS_EVT_INTERRUPT_DI110 = ADS_EVT_INTERRUPT_DI0 + 110;
  ADS_EVT_INTERRUPT_DI111 = ADS_EVT_INTERRUPT_DI0 + 111;

  ADS_EVT_INTERRUPT_DI112 = ADS_EVT_INTERRUPT_DI0 + 112;
  ADS_EVT_INTERRUPT_DI113 = ADS_EVT_INTERRUPT_DI0 + 113;
  ADS_EVT_INTERRUPT_DI114 = ADS_EVT_INTERRUPT_DI0 + 114;
  ADS_EVT_INTERRUPT_DI115 = ADS_EVT_INTERRUPT_DI0 + 115;
  ADS_EVT_INTERRUPT_DI116 = ADS_EVT_INTERRUPT_DI0 + 116;
  ADS_EVT_INTERRUPT_DI117 = ADS_EVT_INTERRUPT_DI0 + 117;
  ADS_EVT_INTERRUPT_DI118 = ADS_EVT_INTERRUPT_DI0 + 118;
  ADS_EVT_INTERRUPT_DI119 = ADS_EVT_INTERRUPT_DI0 + 119;

  ADS_EVT_INTERRUPT_DI120 = ADS_EVT_INTERRUPT_DI0 + 120;
  ADS_EVT_INTERRUPT_DI121 = ADS_EVT_INTERRUPT_DI0 + 121;
  ADS_EVT_INTERRUPT_DI122 = ADS_EVT_INTERRUPT_DI0 + 122;
  ADS_EVT_INTERRUPT_DI123 = ADS_EVT_INTERRUPT_DI0 + 123;
  ADS_EVT_INTERRUPT_DI124 = ADS_EVT_INTERRUPT_DI0 + 124;
  ADS_EVT_INTERRUPT_DI125 = ADS_EVT_INTERRUPT_DI0 + 125;
  ADS_EVT_INTERRUPT_DI126 = ADS_EVT_INTERRUPT_DI0 + 126;
  ADS_EVT_INTERRUPT_DI127 = ADS_EVT_INTERRUPT_DI0 + 127;
 { -------------------2.2-----------------------------}
 
     ADS_EVT_INTERRUPT_DI0_NAME = 'ADS_EVT_INTERRUPT_DI0';
     ADS_EVT_INTERRUPT_DI1_NAME = 'ADS_EVT_INTERRUPT_DI1';
     ADS_EVT_INTERRUPT_DI2_NAME = 'ADS_EVT_INTERRUPT_DI2';
     ADS_EVT_INTERRUPT_DI3_NAME = 'ADS_EVT_INTERRUPT_DI3';
     ADS_EVT_INTERRUPT_DI4_NAME = 'ADS_EVT_INTERRUPT_DI4';
     ADS_EVT_INTERRUPT_DI5_NAME = 'ADS_EVT_INTERRUPT_DI5';
     ADS_EVT_INTERRUPT_DI6_NAME = 'ADS_EVT_INTERRUPT_DI6';
     ADS_EVT_INTERRUPT_DI7_NAME = 'ADS_EVT_INTERRUPT_DI7';

  { sub group 0x3400 ~ 0x37ff for General IDI Event ID 			}

  ADS_EVT_INTERRUPT_IDI0 = $3400;
  ADS_EVT_INTERRUPT_IDI1 = ADS_EVT_INTERRUPT_IDI0 + 1;
  ADS_EVT_INTERRUPT_IDI2 = ADS_EVT_INTERRUPT_IDI0 + 2;
  ADS_EVT_INTERRUPT_IDI3 = ADS_EVT_INTERRUPT_IDI0 + 3;
  ADS_EVT_INTERRUPT_IDI4 = ADS_EVT_INTERRUPT_IDI0 + 4;
  ADS_EVT_INTERRUPT_IDI5 = ADS_EVT_INTERRUPT_IDI0 + 5;
  ADS_EVT_INTERRUPT_IDI6 = ADS_EVT_INTERRUPT_IDI0 + 6;
  ADS_EVT_INTERRUPT_IDI7 = ADS_EVT_INTERRUPT_IDI0 + 7;
 
  

  ADS_EVT_INTERRUPT_IDI16 = ADS_EVT_INTERRUPT_IDI0 + 16;
  ADS_EVT_INTERRUPT_IDI17 = ADS_EVT_INTERRUPT_IDI0 + 17;
  
  ADS_EVT_DI_INTERRUPT0 = $3400;
 ADS_EVT_DI_INTERRUPT1 = ADS_EVT_DI_INTERRUPT0  + 1;
 ADS_EVT_DI_INTERRUPT2 = ADS_EVT_DI_INTERRUPT0  + 2;
 ADS_EVT_DI_INTERRUPT3 = ADS_EVT_DI_INTERRUPT0  + 3;
 ADS_EVT_DI_INTERRUPT4 = ADS_EVT_DI_INTERRUPT0  + 4;
 ADS_EVT_DI_INTERRUPT5 = ADS_EVT_DI_INTERRUPT0  + 5;
 ADS_EVT_DI_INTERRUPT6 = ADS_EVT_DI_INTERRUPT0  + 6;
 ADS_EVT_DI_INTERRUPT7 = ADS_EVT_DI_INTERRUPT0  + 7;
 ADS_EVT_DI_INTERRUPT8 = ADS_EVT_DI_INTERRUPT0  + 8;
 ADS_EVT_DI_INTERRUPT9 = ADS_EVT_DI_INTERRUPT0  + 9;
 ADS_EVT_DI_INTERRUPT10 = ADS_EVT_DI_INTERRUPT0  + 10;
 ADS_EVT_DI_INTERRUPT11 = ADS_EVT_DI_INTERRUPT0  + 11;
 ADS_EVT_DI_INTERRUPT12 = ADS_EVT_DI_INTERRUPT0  + 12;
 ADS_EVT_DI_INTERRUPT13 = ADS_EVT_DI_INTERRUPT0  + 13;
 ADS_EVT_DI_INTERRUPT14 = ADS_EVT_DI_INTERRUPT0  + 14;
 ADS_EVT_DI_INTERRUPT15 = ADS_EVT_DI_INTERRUPT0  + 15;
 ADS_EVT_DI_INTERRUPT16 = ADS_EVT_DI_INTERRUPT0  + 16;
 ADS_EVT_DI_INTERRUPT17 = ADS_EVT_DI_INTERRUPT0  + 17;
 ADS_EVT_DI_INTERRUPT18 = ADS_EVT_DI_INTERRUPT0  + 18;
 ADS_EVT_DI_INTERRUPT19 = ADS_EVT_DI_INTERRUPT0  + 19;
 ADS_EVT_DI_INTERRUPT20 = ADS_EVT_DI_INTERRUPT0  + 20;
 ADS_EVT_DI_INTERRUPT21 = ADS_EVT_DI_INTERRUPT0  + 21;
 ADS_EVT_DI_INTERRUPT22 = ADS_EVT_DI_INTERRUPT0  + 22;
 ADS_EVT_DI_INTERRUPT23 = ADS_EVT_DI_INTERRUPT0  + 23;
 ADS_EVT_DI_INTERRUPT24 = ADS_EVT_DI_INTERRUPT0  + 24;
 ADS_EVT_DI_INTERRUPT25 = ADS_EVT_DI_INTERRUPT0  + 25;
 ADS_EVT_DI_INTERRUPT26 = ADS_EVT_DI_INTERRUPT0  + 26;
 ADS_EVT_DI_INTERRUPT27 = ADS_EVT_DI_INTERRUPT0  + 27;
 ADS_EVT_DI_INTERRUPT28 = ADS_EVT_DI_INTERRUPT0  + 28;
 ADS_EVT_DI_INTERRUPT29 = ADS_EVT_DI_INTERRUPT0  + 29;
 ADS_EVT_DI_INTERRUPT30 = ADS_EVT_DI_INTERRUPT0  + 30;
 ADS_EVT_DI_INTERRUPT31 = ADS_EVT_DI_INTERRUPT0  + 31;
 ADS_EVT_DI_INTERRUPT32 = ADS_EVT_DI_INTERRUPT0  + 32;
 ADS_EVT_DI_INTERRUPT33 = ADS_EVT_DI_INTERRUPT0  + 33;
 ADS_EVT_DI_INTERRUPT34 = ADS_EVT_DI_INTERRUPT0  + 34;
 ADS_EVT_DI_INTERRUPT35 = ADS_EVT_DI_INTERRUPT0  + 35;
 ADS_EVT_DI_INTERRUPT36 = ADS_EVT_DI_INTERRUPT0  + 36;
 ADS_EVT_DI_INTERRUPT37 = ADS_EVT_DI_INTERRUPT0  + 37;
 ADS_EVT_DI_INTERRUPT38 = ADS_EVT_DI_INTERRUPT0  + 38;
 ADS_EVT_DI_INTERRUPT39 = ADS_EVT_DI_INTERRUPT0  + 39;
 ADS_EVT_DI_INTERRUPT40 = ADS_EVT_DI_INTERRUPT0  + 40;
 ADS_EVT_DI_INTERRUPT41 = ADS_EVT_DI_INTERRUPT0  + 41;
 ADS_EVT_DI_INTERRUPT42 = ADS_EVT_DI_INTERRUPT0  + 42;
 ADS_EVT_DI_INTERRUPT43 = ADS_EVT_DI_INTERRUPT0  + 43;
 ADS_EVT_DI_INTERRUPT44 = ADS_EVT_DI_INTERRUPT0  + 44;
 ADS_EVT_DI_INTERRUPT45 = ADS_EVT_DI_INTERRUPT0  + 45;
 ADS_EVT_DI_INTERRUPT46 = ADS_EVT_DI_INTERRUPT0  + 46;
 ADS_EVT_DI_INTERRUPT47 = ADS_EVT_DI_INTERRUPT0  + 47;
 ADS_EVT_DI_INTERRUPT48 = ADS_EVT_DI_INTERRUPT0  + 48;
 ADS_EVT_DI_INTERRUPT49 = ADS_EVT_DI_INTERRUPT0  + 49;
 ADS_EVT_DI_INTERRUPT50 = ADS_EVT_DI_INTERRUPT0  + 50;
 ADS_EVT_DI_INTERRUPT51 = ADS_EVT_DI_INTERRUPT0  + 51;
 ADS_EVT_DI_INTERRUPT52 = ADS_EVT_DI_INTERRUPT0  + 52;
 ADS_EVT_DI_INTERRUPT53 = ADS_EVT_DI_INTERRUPT0  + 53;
 ADS_EVT_DI_INTERRUPT54 = ADS_EVT_DI_INTERRUPT0  + 54;
 ADS_EVT_DI_INTERRUPT55 = ADS_EVT_DI_INTERRUPT0  + 55;
 ADS_EVT_DI_INTERRUPT56 = ADS_EVT_DI_INTERRUPT0  + 56;
 ADS_EVT_DI_INTERRUPT57 = ADS_EVT_DI_INTERRUPT0  + 57;
 ADS_EVT_DI_INTERRUPT58 = ADS_EVT_DI_INTERRUPT0  + 58;
 ADS_EVT_DI_INTERRUPT59 = ADS_EVT_DI_INTERRUPT0  + 59;
 ADS_EVT_DI_INTERRUPT60 = ADS_EVT_DI_INTERRUPT0  + 60;
 ADS_EVT_DI_INTERRUPT61 = ADS_EVT_DI_INTERRUPT0  + 61;
 ADS_EVT_DI_INTERRUPT62 = ADS_EVT_DI_INTERRUPT0  + 62;
 ADS_EVT_DI_INTERRUPT63 = ADS_EVT_DI_INTERRUPT0  + 63;
 ADS_EVT_DI_INTERRUPT64 = ADS_EVT_DI_INTERRUPT0  + 64;
 ADS_EVT_DI_INTERRUPT65 = ADS_EVT_DI_INTERRUPT0  + 65;
 ADS_EVT_DI_INTERRUPT66 = ADS_EVT_DI_INTERRUPT0  + 66;
 ADS_EVT_DI_INTERRUPT67 = ADS_EVT_DI_INTERRUPT0  + 67;
 ADS_EVT_DI_INTERRUPT68 = ADS_EVT_DI_INTERRUPT0  + 68;
 ADS_EVT_DI_INTERRUPT69 = ADS_EVT_DI_INTERRUPT0  + 69;
 ADS_EVT_DI_INTERRUPT70 = ADS_EVT_DI_INTERRUPT0  + 70;
 ADS_EVT_DI_INTERRUPT71 = ADS_EVT_DI_INTERRUPT0  + 71;
 ADS_EVT_DI_INTERRUPT72 = ADS_EVT_DI_INTERRUPT0  + 72;
 ADS_EVT_DI_INTERRUPT73 = ADS_EVT_DI_INTERRUPT0  + 73;
 ADS_EVT_DI_INTERRUPT74 = ADS_EVT_DI_INTERRUPT0  + 74;
 ADS_EVT_DI_INTERRUPT75 = ADS_EVT_DI_INTERRUPT0  + 75;
 ADS_EVT_DI_INTERRUPT76 = ADS_EVT_DI_INTERRUPT0  + 76;
 ADS_EVT_DI_INTERRUPT77 = ADS_EVT_DI_INTERRUPT0  + 77;
 ADS_EVT_DI_INTERRUPT78 = ADS_EVT_DI_INTERRUPT0  + 78;
 ADS_EVT_DI_INTERRUPT79 = ADS_EVT_DI_INTERRUPT0  + 79;
 ADS_EVT_DI_INTERRUPT80 = ADS_EVT_DI_INTERRUPT0  + 80;
 ADS_EVT_DI_INTERRUPT81 = ADS_EVT_DI_INTERRUPT0  + 81;
 ADS_EVT_DI_INTERRUPT82 = ADS_EVT_DI_INTERRUPT0  + 82;
 ADS_EVT_DI_INTERRUPT83 = ADS_EVT_DI_INTERRUPT0  + 83;
 ADS_EVT_DI_INTERRUPT84 = ADS_EVT_DI_INTERRUPT0  + 84;
 ADS_EVT_DI_INTERRUPT85 = ADS_EVT_DI_INTERRUPT0  + 85;
 ADS_EVT_DI_INTERRUPT86 = ADS_EVT_DI_INTERRUPT0  + 86;
 ADS_EVT_DI_INTERRUPT87 = ADS_EVT_DI_INTERRUPT0  + 87;
 ADS_EVT_DI_INTERRUPT88 = ADS_EVT_DI_INTERRUPT0  + 88;
 ADS_EVT_DI_INTERRUPT89 = ADS_EVT_DI_INTERRUPT0  + 89;
 ADS_EVT_DI_INTERRUPT90 = ADS_EVT_DI_INTERRUPT0  + 90;
 ADS_EVT_DI_INTERRUPT91 = ADS_EVT_DI_INTERRUPT0  + 91;
 ADS_EVT_DI_INTERRUPT92 = ADS_EVT_DI_INTERRUPT0  + 92;
 ADS_EVT_DI_INTERRUPT93 = ADS_EVT_DI_INTERRUPT0  + 93;
 ADS_EVT_DI_INTERRUPT94 = ADS_EVT_DI_INTERRUPT0  + 94;
 ADS_EVT_DI_INTERRUPT95 = ADS_EVT_DI_INTERRUPT0  + 95;
 ADS_EVT_DI_INTERRUPT96 = ADS_EVT_DI_INTERRUPT0  + 96;
 ADS_EVT_DI_INTERRUPT97 = ADS_EVT_DI_INTERRUPT0  + 97;
 ADS_EVT_DI_INTERRUPT98 = ADS_EVT_DI_INTERRUPT0  + 98;
 ADS_EVT_DI_INTERRUPT99 = ADS_EVT_DI_INTERRUPT0  + 99;
 ADS_EVT_DI_INTERRUPT100 = ADS_EVT_DI_INTERRUPT0  + 100;
 ADS_EVT_DI_INTERRUPT101 = ADS_EVT_DI_INTERRUPT0  + 101;
 ADS_EVT_DI_INTERRUPT102 = ADS_EVT_DI_INTERRUPT0  + 102;
 ADS_EVT_DI_INTERRUPT103 = ADS_EVT_DI_INTERRUPT0  + 103;
 ADS_EVT_DI_INTERRUPT104 = ADS_EVT_DI_INTERRUPT0  + 104;
 ADS_EVT_DI_INTERRUPT105 = ADS_EVT_DI_INTERRUPT0  + 105;
 ADS_EVT_DI_INTERRUPT106 = ADS_EVT_DI_INTERRUPT0  + 106;
 ADS_EVT_DI_INTERRUPT107 = ADS_EVT_DI_INTERRUPT0  + 107;
 ADS_EVT_DI_INTERRUPT108 = ADS_EVT_DI_INTERRUPT0  + 108;
 ADS_EVT_DI_INTERRUPT109 = ADS_EVT_DI_INTERRUPT0  + 109;
 ADS_EVT_DI_INTERRUPT110 = ADS_EVT_DI_INTERRUPT0  + 110;
 ADS_EVT_DI_INTERRUPT111 = ADS_EVT_DI_INTERRUPT0  + 111;
 ADS_EVT_DI_INTERRUPT112 = ADS_EVT_DI_INTERRUPT0  + 112;
 ADS_EVT_DI_INTERRUPT113 = ADS_EVT_DI_INTERRUPT0  + 113;
 ADS_EVT_DI_INTERRUPT114 = ADS_EVT_DI_INTERRUPT0  + 114;
 ADS_EVT_DI_INTERRUPT115 = ADS_EVT_DI_INTERRUPT0  + 115;
 ADS_EVT_DI_INTERRUPT116 = ADS_EVT_DI_INTERRUPT0  + 116;
 ADS_EVT_DI_INTERRUPT117 = ADS_EVT_DI_INTERRUPT0  + 117;
 ADS_EVT_DI_INTERRUPT118 = ADS_EVT_DI_INTERRUPT0  + 118;
 ADS_EVT_DI_INTERRUPT119 = ADS_EVT_DI_INTERRUPT0  + 119;
 ADS_EVT_DI_INTERRUPT120 = ADS_EVT_DI_INTERRUPT0  + 120;
 ADS_EVT_DI_INTERRUPT121 = ADS_EVT_DI_INTERRUPT0  + 121;
 ADS_EVT_DI_INTERRUPT122 = ADS_EVT_DI_INTERRUPT0  + 122;
 ADS_EVT_DI_INTERRUPT123 = ADS_EVT_DI_INTERRUPT0  + 123;
 ADS_EVT_DI_INTERRUPT124 = ADS_EVT_DI_INTERRUPT0  + 124;
 ADS_EVT_DI_INTERRUPT125 = ADS_EVT_DI_INTERRUPT0  + 125;
 ADS_EVT_DI_INTERRUPT126 = ADS_EVT_DI_INTERRUPT0  + 126;
 ADS_EVT_DI_INTERRUPT127 = ADS_EVT_DI_INTERRUPT0  + 127;
 
 ADS_EVT_DI_INTERRUPT136 = ADS_EVT_DI_INTERRUPT0  + 136;

 ADS_EVT_DI_INTERRUPT160 = ADS_EVT_DI_INTERRUPT0  + 160; 

 ADS_EVT_DI_INTERRUPT184 = ADS_EVT_DI_INTERRUPT0  + 184; 
  

     ADS_EVT_INTERRUPT_IDI0_NAME	 =  'ADS_EVT_INTERRUPT_IDI0';
     ADS_EVT_INTERRUPT_IDI1_NAME	 =  'ADS_EVT_INTERRUPT_IDI1';
     ADS_EVT_INTERRUPT_IDI2_NAME	 =  'ADS_EVT_INTERRUPT_IDI2';
     ADS_EVT_INTERRUPT_IDI3_NAME	 =  'ADS_EVT_INTERRUPT_IDI3';
     ADS_EVT_INTERRUPT_IDI4_NAME	 =  'ADS_EVT_INTERRUPT_IDI4';
     ADS_EVT_INTERRUPT_IDI5_NAME	 =  'ADS_EVT_INTERRUPT_IDI5';
     ADS_EVT_INTERRUPT_IDI6_NAME	 =  'ADS_EVT_INTERRUPT_IDI6';
     ADS_EVT_INTERRUPT_IDI7_NAME	 =  'ADS_EVT_INTERRUPT_IDI7';
     ADS_EVT_INTERRUPT_IDI16_NAME        =  'ADS_EVT_INTERRUPT_IDI16';
     ADS_EVT_INTERRUPT_IDI17_NAME        =  'ADS_EVT_INTERRUPT_IDI17';

  { sub group 0x38000 ~ 0x3fff for DI General ID                             }

  ADS_EVT_FIFO_OVERFLOW_DI  =  $3800;
  ADS_EVT_FIFO_UNDERFLOW_DI =  $3801;
  ADS_EVT_BUFFER1_FULL_DI   =  $3802;
  ADS_EVT_BUFFER2_FULL_DI   =  $3803;
  {------------------- V2.0C ------------------ }
  ADS_EVT_DI_LOBUFREADY  =      $3804; 
  ADS_EVT_DI_HIBUFREADY  =      $3805;
  ADS_EVT_DI_TERMINATED  =      $3810;
  ADS_EVT_DI_OVERRUN     =      $3811;
  ADS_EVT_DI_PATTERNMATCH   =   $3812;
  ADS_EVT_DI_STATUSCHANGE   =   $3813; 
  {------------------- V2.0C ------------------ }
  
  ADS_EVT_DI_PATTERNMATCH_PORT0 = $3814;
  ADS_EVT_DI_PATTERNMATCH_PORT12= ADS_EVT_DI_PATTERNMATCH_PORT0 + 12;
  ADS_EVT_DI_PATTERNMATCH_PORT31= ADS_EVT_DI_PATTERNMATCH_PORT0 + 31;
  
  ADS_EVT_DI_STATUSCHANGE_PORT0 = $3834;
  ADS_EVT_DI_STATUSCHANGE_PORT1 = ADS_EVT_DI_STATUSCHANGE_PORT0 + 1;
  ADS_EVT_DI_STATUSCHANGE_PORT13= ADS_EVT_DI_STATUSCHANGE_PORT0 + 13;
  ADS_EVT_DI_STATUSCHANGE_PORT31= ADS_EVT_DI_STATUSCHANGE_PORT0 + 31;

     ADS_EVT_FIFO_OVERFLOW_DI_NAME =    'ADS_EVT_FIFO_OVERFLOW_DI';
     ADS_EVT_FIFO_UNDERFLOW_DI_NAME=    'ADS_EVT_FIFO_UNDERFLOW_DI';
     ADS_EVT_BUFFER1_FULL_DI_NAME	 =    'ADS_EVT_BUFFER1_FULL_DI';
     ADS_EVT_BUFFER2_FULL_DI_NAME	 =    'ADS_EVT_BUFFER2_FULL_DI';
     {------------------- V2.0C ------------------ }
     ADS_EVT_DI_LOBUFREADY_NAME  =      'ADS_EVT_DI_LOBUFREADY'; 
     ADS_EVT_DI_HIBUFREADY_NAME  =      'ADS_EVT_DI_HIBUFREADY';
     ADS_EVT_DI_TERMINATED_NAME  =      'ADS_EVT_DI_TERMINATED';
     ADS_EVT_DI_OVERRUN_NAME     =      'ADS_EVT_DI_OVERRUN';
     ADS_EVT_DI_PATTERNMATCH_NAME   =   'ADS_EVT_DI_PATTERNMATCH';
     ADS_EVT_DI_STATUSCHANGE_NAME   =   'ADS_EVT_DI_STATUSCHANGE'; 
     {------------------- V2.0C ------------------ }

{ ----------------------------------                                       }
{ 0x4000 ~ 0x4fff for DO Group                                             }
{ ----------------------------------                                       }
  { sub group 0x4000 ~ 0x47ff for DO General ID                            }

  { sub group 0x4800 ~ 0x4fff for DO others ID                             }

  ADS_EVT_FIFO_OVERFLOW_DO  =  $4800;
  ADS_EVT_FIFO_UNDERFLOW_DO =  $4801;
  ADS_EVT_BUFFER1_EMPTY_DO  =  $4802;
  ADS_EVT_BUFFER2_EMPTY_DO  =  $4803;
  {------------------- V2.0C ------------------ }
  ADS_EVT_DO_LOBUFTRANS      =  $4804;
  ADS_EVT_DO_HIBUFTRANS      =  $4805;
  ADS_EVT_DO_TERMINATED      =  $4810;
  ADS_EVT_DO_UNDERRUN        =  $4811; 
  {------------------- V2.0C ------------------ }

     ADS_EVT_FIFO_OVERFLOW_DO_NAME	=    'ADS_EVT_FIFO_OVERFLOW_DO';
     ADS_EVT_FIFO_UNDERFLOW_DO_NAME	=    'ADS_EVT_FIFO_UNDERFLOW_DO';
     ADS_EVT_BUFFER1_EMPTY_DO_NAME	=    'ADS_EVT_BUFFER1_EMPTY_DO';
     ADS_EVT_BUFFER2_EMPTY_DO_NAME	=    'ADS_EVT_BUFFER2_EMPTY_DO';
     {------------------- V2.0C ------------------ }
     ADS_EVT_DO_LOBUFTRANS_NAME      =  'ADS_EVT_DO_LOBUFTRANS';
     ADS_EVT_DO_HIBUFTRANS_NAME      =  'ADS_EVT_DO_HIBUFTRANS';
     ADS_EVT_DO_TERMINATED_NAME      =  'ADS_EVT_DO_TERMINATED';
     ADS_EVT_DO_UNDERRUN_NAME        =  'ADS_EVT_DO_UNDERRUN'; 
     {------------------- V2.0C ------------------ }

{ ---------------------------------------                                  }
{ 0x5000 ~ 0x5fff for Counter/Timer                                        }
{ ---------------------------------------                                  }
  { sub group 0x5000 ~ 0x57ff for Counter/Timer general ID                 }

  ADS_EVT_TERMINATE_CNT0  =    $5000;
  ADS_EVT_TERMINATE_CNT1  =    ADS_EVT_TERMINATE_CNT0 + 1;
  ADS_EVT_TERMINATE_CNT2  =    ADS_EVT_TERMINATE_CNT0 + 2;
  ADS_EVT_TERMINATE_CNT3  =    ADS_EVT_TERMINATE_CNT0 + 3;
  ADS_EVT_TERMINATE_CNT4  =    ADS_EVT_TERMINATE_CNT0 + 4;
  ADS_EVT_TERMINATE_CNT5  =    ADS_EVT_TERMINATE_CNT0 + 5;
  ADS_EVT_TERMINATE_CNT6  =    ADS_EVT_TERMINATE_CNT0 + 6;
  ADS_EVT_TERMINATE_CNT7  =    ADS_EVT_TERMINATE_CNT0 + 7;

     ADS_EVT_TERMINATE_CNT0_NAME  =       'ADS_EVT_TERMINATE_CNT0';
     ADS_EVT_TERMINATE_CNT1_NAME  =       'ADS_EVT_TERMINATE_CNT1';
     ADS_EVT_TERMINATE_CNT2_NAME  =       'ADS_EVT_TERMINATE_CNT2';
     ADS_EVT_TERMINATE_CNT3_NAME  =       'ADS_EVT_TERMINATE_CNT3';
     ADS_EVT_TERMINATE_CNT4_NAME  =       'ADS_EVT_TERMINATE_CNT4';
     ADS_EVT_TERMINATE_CNT5_NAME  =       'ADS_EVT_TERMINATE_CNT5';
     ADS_EVT_TERMINATE_CNT6_NAME  =       'ADS_EVT_TERMINATE_CNT6';
     ADS_EVT_TERMINATE_CNT7_NAME  =       'ADS_EVT_TERMINATE_CNT7';

  { sub group 0x5100 ~ 0x51ff for counter overflow Event ID          }

  ADS_EVT_OVERFLOW_CNT0  =     $5100;
  ADS_EVT_OVERFLOW_CNT1  =     ADS_EVT_OVERFLOW_CNT0 + 1;
  ADS_EVT_OVERFLOW_CNT2  =     ADS_EVT_OVERFLOW_CNT0 + 2;
  ADS_EVT_OVERFLOW_CNT3  =     ADS_EVT_OVERFLOW_CNT0 + 3;
  ADS_EVT_OVERFLOW_CNT4  =     ADS_EVT_OVERFLOW_CNT0 + 4;
  ADS_EVT_OVERFLOW_CNT5  =     ADS_EVT_OVERFLOW_CNT0 + 5;
  ADS_EVT_OVERFLOW_CNT6  =     ADS_EVT_OVERFLOW_CNT0 + 6;
  ADS_EVT_OVERFLOW_CNT7  =     ADS_EVT_OVERFLOW_CNT0 + 7;

    ADS_EVT_OVERFLOW_CNT0_NAME =  'ADS_EVT_OVERFLOW_CNT0';
    ADS_EVT_OVERFLOW_CNT1_NAME =  'ADS_EVT_OVERFLOW_CNT1';
    ADS_EVT_OVERFLOW_CNT2_NAME =  'ADS_EVT_OVERFLOW_CNT2';
    ADS_EVT_OVERFLOW_CNT3_NAME =  'ADS_EVT_OVERFLOW_CNT3';
    ADS_EVT_OVERFLOW_CNT4_NAME =  'ADS_EVT_OVERFLOW_CNT4';
    ADS_EVT_OVERFLOW_CNT5_NAME =  'ADS_EVT_OVERFLOW_CNT5';
    ADS_EVT_OVERFLOW_CNT6_NAME =  'ADS_EVT_OVERFLOW_CNT6';
    ADS_EVT_OVERFLOW_CNT7_NAME =  'ADS_EVT_OVERFLOW_CNT7';

  { sub group 0x5200 ~ 0x52ff for counter underflow Event ID   }

  ADS_EVT_UNDERFLOW_CNT0   =   $5200;
  ADS_EVT_UNDERFLOW_CNT1   =   ADS_EVT_UNDERFLOW_CNT0 + 1;
  ADS_EVT_UNDERFLOW_CNT2   =   ADS_EVT_UNDERFLOW_CNT0 + 2;
  ADS_EVT_UNDERFLOW_CNT3   =   ADS_EVT_UNDERFLOW_CNT0 + 3;
  ADS_EVT_UNDERFLOW_CNT4   =   ADS_EVT_UNDERFLOW_CNT0 + 4;
  ADS_EVT_UNDERFLOW_CNT5   =   ADS_EVT_UNDERFLOW_CNT0 + 5;
  ADS_EVT_UNDERFLOW_CNT6   =   ADS_EVT_UNDERFLOW_CNT0 + 6;
  ADS_EVT_UNDERFLOW_CNT7   =   ADS_EVT_UNDERFLOW_CNT0 + 7;

     ADS_EVT_UNDERFLOW_CNT0_NAME   =      'ADS_EVT_UNDERFLOW_CNT0';
     ADS_EVT_UNDERFLOW_CNT1_NAME   =      'ADS_EVT_UNDERFLOW_CNT1';
     ADS_EVT_UNDERFLOW_CNT2_NAME   =      'ADS_EVT_UNDERFLOW_CNT2';
     ADS_EVT_UNDERFLOW_CNT3_NAME   =      'ADS_EVT_UNDERFLOW_CNT3';
     ADS_EVT_UNDERFLOW_CNT4_NAME   =      'ADS_EVT_UNDERFLOW_CNT4';
     ADS_EVT_UNDERFLOW_CNT5_NAME   =      'ADS_EVT_UNDERFLOW_CNT5';
     ADS_EVT_UNDERFLOW_CNT6_NAME   =      'ADS_EVT_UNDERFLOW_CNT6';
     ADS_EVT_UNDERFLOW_CNT7_NAME   =      'ADS_EVT_UNDERFLOW_CNT7';

  { sub group 0x5300 ~ 0x53ff for counter OVER COMPARE Event ID }
     ADS_EVT_OVERCOMPARE_CNT0      =   $5300;
     ADS_EVT_OVERCOMPARE_CNT1      = ADS_EVT_OVERCOMPARE_CNT0 + 1;
     ADS_EVT_OVERCOMPARE_CNT2      = ADS_EVT_OVERCOMPARE_CNT0 + 2;
     ADS_EVT_OVERCOMPARE_CNT3      = ADS_EVT_OVERCOMPARE_CNT0 + 3;

     ADS_EVT_OVERCOMPARE_CNT0_NAME = 'ADS_EVT_OVERCOMPARE_CNT0';
     ADS_EVT_OVERCOMPARE_CNT1_NAME = 'ADS_EVT_OVERCOMPARE_CNT1';
     ADS_EVT_OVERCOMPARE_CNT2_NAME = 'ADS_EVT_OVERCOMPARE_CNT2';
     ADS_EVT_OVERCOMPARE_CNT3_NAME = 'ADS_EVT_OVERCOMPARE_CNT3';

  { sub group 0x5400 ~ 0x54ff for counter UNDER COMPARE Event ID}
     ADS_EVT_UNDERCOMPARE_CNT0     = $5400;
     ADS_EVT_UNDERCOMPARE_CNT1     = ADS_EVT_UNDERCOMPARE_CNT0 + 1;
     ADS_EVT_UNDERCOMPARE_CNT2     = ADS_EVT_UNDERCOMPARE_CNT0 + 2;
     ADS_EVT_UNDERCOMPARE_CNT3     = ADS_EVT_UNDERCOMPARE_CNT0 + 3;

     ADS_EVT_UNDERCOMPARE_CNT0_NAME = 'ADS_EVT_UNDERCOMPARE_CNT0';
     ADS_EVT_UNDERCOMPARE_CNT1_NAME = 'ADS_EVT_UNDERCOMPARE_CNT1';
     ADS_EVT_UNDERCOMPARE_CNT2_NAME = 'ADS_EVT_UNDERCOMPARE_CNT2';
     ADS_EVT_UNDERCOMPARE_CNT3_NAME = 'ADS_EVT_UNDERCOMPARE_CNT3';

  { sub group 0x5500 ~ 0x55ff for GENERAL TIMER Event ID     }

  ADS_EVT_INTERRUPT_TIMER0  =  $5500;
  ADS_EVT_INTERRUPT_TIMER1  =  ADS_EVT_INTERRUPT_TIMER0 + 1;
  ADS_EVT_INTERRUPT_TIMER2  =  ADS_EVT_INTERRUPT_TIMER0 + 2;
  ADS_EVT_INTERRUPT_TIMER3  =  ADS_EVT_INTERRUPT_TIMER0 + 3;
  ADS_EVT_INTERRUPT_TIMER4  =  ADS_EVT_INTERRUPT_TIMER0 + 4;
  ADS_EVT_INTERRUPT_TIMER5  =  ADS_EVT_INTERRUPT_TIMER0 + 5;
  ADS_EVT_INTERRUPT_TIMER6  =  ADS_EVT_INTERRUPT_TIMER0 + 6;
  ADS_EVT_INTERRUPT_TIMER7  =  ADS_EVT_INTERRUPT_TIMER0 + 7;

  ADS_EVT_TC_TIMER          =   $5200;

     ADS_EVT_INTERRUPT_TIMER0_NAME  =       'ADS_EVT_INTERRUPT_TIMER0';
     ADS_EVT_INTERRUPT_TIMER1_NAME  =       'ADS_EVT_INTERRUPT_TIMER1';
     ADS_EVT_INTERRUPT_TIMER2_NAME  =       'ADS_EVT_INTERRUPT_TIMER2';
     ADS_EVT_INTERRUPT_TIMER3_NAME  =       'ADS_EVT_INTERRUPT_TIMER3';
     ADS_EVT_INTERRUPT_TIMER4_NAME  =       'ADS_EVT_INTERRUPT_TIMER4';
     ADS_EVT_INTERRUPT_TIMER5_NAME  =       'ADS_EVT_INTERRUPT_TIMER5';
     ADS_EVT_INTERRUPT_TIMER6_NAME  =       'ADS_EVT_INTERRUPT_TIMER6';
     ADS_EVT_INTERRUPT_TIMER7_NAME  =       'ADS_EVT_INTERRUPT_TIMER7';
     ADS_EVT_TC_TIMER_NAME          =       'ADS_EVT_TC_TIMER';

  { sub group 0x5800 ~ 0x5fff for counter/Timer general ID                 }
     ADS_EVT_INDEX_CNT0             = $5800;
     ADS_EVT_INDEX_CNT1             = ADS_EVT_INDEX_CNT0 + 1;
     ADS_EVT_INDEX_CNT2             = ADS_EVT_INDEX_CNT0 + 2;
     ADS_EVT_INDEX_CNT3             = ADS_EVT_INDEX_CNT0 + 3;

     ADS_EVT_INDEX_CNT0_NAME        = 'ADS_EVT_INDEX_CNT0';
     ADS_EVT_INDEX_CNT1_NAME        = 'ADS_EVT_INDEX_CNT1';
     ADS_EVT_INDEX_CNT2_NAME        = 'ADS_EVT_INDEX_CNT2';
     ADS_EVT_INDEX_CNT3_NAME        = 'ADS_EVT_INDEX_CNT3';

  { Event closed }
  ADS_EVT_DEVICE_CLOSED = $fffe;

implementation

end.










